package com.muyu.system.service.impl;

import java.util.List;

import com.muyu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.system.mapper.DanmoMarketTypesMapper;
import com.muyu.system.domain.DanmoMarketTypes;
import com.muyu.system.service.IDanmoMarketTypesService;

/**
 * 书画市场类型Service业务层处理
 * 
 * @author kunzong
 * @date 2024-12-04
 */
@Service
public class DanmoMarketTypesServiceImpl implements IDanmoMarketTypesService 
{
    @Autowired
    private DanmoMarketTypesMapper danmoMarketTypesMapper;

    /**
     * 查询书画市场类型
     * 
     * @param id 书画市场类型主键
     * @return 书画市场类型
     */
    @Override
    public DanmoMarketTypes selectDanmoMarketTypesById(Long id)
    {
        return danmoMarketTypesMapper.selectDanmoMarketTypesById(id);
    }

    /**
     * 查询书画市场类型列表
     * 
     * @param danmoMarketTypes 书画市场类型
     * @return 书画市场类型
     */
    @Override
    public List<DanmoMarketTypes> selectDanmoMarketTypesList(DanmoMarketTypes danmoMarketTypes)
    {
        return danmoMarketTypesMapper.selectDanmoMarketTypesList(danmoMarketTypes);
    }

    /**
     * 新增书画市场类型
     * 
     * @param danmoMarketTypes 书画市场类型
     * @return 结果
     */
    @Override
    public int insertDanmoMarketTypes(DanmoMarketTypes danmoMarketTypes)
    {
        danmoMarketTypes.setCreateTime(DateUtils.getNowDate());
        return danmoMarketTypesMapper.insertDanmoMarketTypes(danmoMarketTypes);
    }

    /**
     * 修改书画市场类型
     * 
     * @param danmoMarketTypes 书画市场类型
     * @return 结果
     */
    @Override
    public int updateDanmoMarketTypes(DanmoMarketTypes danmoMarketTypes)
    {
        danmoMarketTypes.setUpdateTime(DateUtils.getNowDate());
        return danmoMarketTypesMapper.updateDanmoMarketTypes(danmoMarketTypes);
    }

    /**
     * 批量删除书画市场类型
     * 
     * @param ids 需要删除的书画市场类型主键
     * @return 结果
     */
    @Override
    public int deleteDanmoMarketTypesByIds(Long[] ids)
    {
        return danmoMarketTypesMapper.deleteDanmoMarketTypesByIds(ids);
    }

    /**
     * 删除书画市场类型信息
     * 
     * @param id 书画市场类型主键
     * @return 结果
     */
    @Override
    public int deleteDanmoMarketTypesById(Long id)
    {
        return danmoMarketTypesMapper.deleteDanmoMarketTypesById(id);
    }
}
